<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<head>
    <meta charset="UTF - 8">

    <title>用户注册</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/css/user.css">
</head>

<html lang="zh-CN">


<body>
<div class="modal">
    <div class="modal-header">
        <h2>注册用户信息</h2>
        <span class="close">&times;</span>
    </div>
    <form action="${pageContext.request.contextPath}/user/add" method="post" enctype="multipart/form-data">
    <div class="modal-body">

            <div class="form-group">
                <label for="userName">用户名称</label>
                <input type="text" id="username" name="username" >
            </div>
            <div class="form-group">
                <label for="password">用户密码</label>
                <input type="password" id="password" name="password" >
            </div>
            <div class="form-group">
                <label for="age">年龄</label>
                <input type="number" id="age" name="age" >
            </div>
            <div class="form-group">
                <label for="sex">性别</label>
                <select id="sex" name="sex">
                    <option value="1">女</option>
                    <option value="2">男</option>
                </select>
            </div>
            <div class="form-group">
                <label for="phone">电话号码</label>
                <input type="text" id="phone" name="telephone">
            </div>
            <div class="form-group">
                <label for="email">Email</label>
                <input type="email" id="email" name="email">
            </div>
            <div class="form-group">
                <label for="address">地址</label>
                <input type="text" id="address" name="address">
            </div>
            <div class="form-group">
                <label for="experience">经历</label>
                <select id="experience" name="state">
                    <option value="1">无领养经历</option>
                    <option value="2">有领养经历</option>
                </select>
            </div>
            <div class="form-group">
                <label for="avatar">头像</label>

                <input type="file" id="avatar" name="file">
            </div>

    </div>
    <div class="modal-footer">
        <button type="button" class="close-button">关闭</button>
        <button type="submit" class="save-button">保存修改</button>
    </div>
</div>
</form>
<script>
    // 获取关闭按钮和模态框
    var close = document.getElementsByClassName("close")[0];
    var modal = document.getElementsByClassName("modal")[0];
    var closeButton = document.getElementsByClassName("close-button")[0];

    // 点击关闭按钮或关闭图标时关闭模态框
    close.onclick = function () {
        modal.style.display = "none";
    };
    closeButton.onclick = function () {
        modal.style.display = "none";
    };
</script>
</body>

</html>